#ifndef SIGNINWIDGET_H
#define SIGNINWIDGET_H

#include <QWidget>
#include "ElaPushButton.h"
#include "ElaLineEdit.h"
#include "ElaText.h"

class SignInWidget : public QWidget
{
    Q_OBJECT
public:
    explicit SignInWidget(QWidget *parent = nullptr);

signals:
    void signInRequested(const QString &username, const QString &password); // 注册请求信号
    void switchToLogin();

private:
    void initUI();
    void initConnections();

    /* 界面元素 */
    ElaText *m_titleText;               // 标题文本
    ElaLineEdit *m_usernameEdit;          // 用户名输入框
    ElaLineEdit *m_passwordEdit;          // 密码输入框
    ElaLineEdit *m_confirmPasswordEdit;   // 确认密码框
    ElaPushButton *m_confirmBtn;        // 确认按钮
    ElaPushButton *m_cancelBtn;         // 取消按钮
};

#endif // SIGNINWIDGET_H
